package com.chen.controller;

import com.chen.pojo.User;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {


    @ApiOperation("hello类")
    @GetMapping("/hello")
    @ResponseBody
    public String hello(){
        return "hello";
    }


    //测试实体类
    @ApiOperation("user测试")
    @PostMapping("/user")
    @ResponseBody
    public User getUser(){
        return new User();
    }
}
